package it.unina.lab.anm.models;

import java.util.List;

public class Linea {

	public static String ALL_LINEE = "*";
	private String nameLine = null;
	private List<Fermata> fermate = null;
	
	
	
	
	public Linea(String nameLine) {
		super();
		this.nameLine = nameLine;
		this.fermate = null;
	}
	
	
	
	public Linea(String nameLine, List<Fermata> fermate) {
		super();
		this.nameLine = nameLine;
		this.fermate = fermate;
	}
	
	
	
	public String getNameLine() {
		return nameLine;
	}
	public void setNameLine(String nameLine) {
		this.nameLine = nameLine;
	}
	public List<Fermata> getFermate() {
		return fermate;
	}
	public void setFermate(List<Fermata> fermate) {
		this.fermate = fermate;
	}
	
	
	public String toString(){
		return this.getNameLine();
	}



	@Override
	public boolean equals(Object o) {
		if (!(o instanceof Linea))
			return false;
		
		Linea linea = (Linea) o;
		if(linea.getNameLine().equalsIgnoreCase(this.getNameLine()))
			return true;
		
		return false;			
	}
	
	
	
}
